<script setup lang="ts">
import { toRaw } from 'vue'
import { useRouter, useRoute } from "vue-router";
import { userSiteArticleDetails } from "../../api/article"
const router = useRouter();
const route:any = useRoute()
const routes = [
  {
    path: '/',
    breadcrumbName: '首页',
  },
  {
    path: '/articleList',
    breadcrumbName: '文章列表',
  },
  {
    path: '/articleDetails',
    breadcrumbName: toRaw(router).currentRoute.value.name,
  },
];

// 获取详情
const onDetails = () => {
    userSiteArticleDetails({articleId: route.query.articleId}).then((response:any) => {
        const result = response.data
        console.log('result',result)
    }).catch(err => {console.log(err)})
}
onDetails()
</script>

<template>
  <div class="articleDetails">
    <a-page-header
        style="padding-bottom:0;padding-left:0"
        title="文章详情"
        sub-title=""
         :breadcrumb="{ routes }"
        @back="() => $router.back()"
    />
    articleDetails详情
  </div>
</template>

<style scoped>

</style>